import {get, post, del, put} from '../utils/request'

//获取用户地址列表
export function getAddressList() {
    return get('/address/list')
}

//获取地址详情
export function getAddressDetail(id) {
    return get('/address/getitem/' + id);
}

//更新收货地址
export function EditAddress(id, data) {
    return post('/address/update/' + id, data)
}

//添加收货地址
export function addAddress(data) {
    return post('/address/insert', data)
}

//删除收货地址
export function DeleteAddress(id) {
    return del('/address/del/' + id)
}

//获取用户默认地址
export function getDefaultAddress() {
    return get('/address/getdefault/address')
}